package com.lemons.hackaton.obj;

import java.util.HashSet;
import java.util.Set;

public class Person {
	private String name;
	private Float budget;
	private Integer maxAwakeTime;
	private Integer continuousSleepTime;
	private Set<String> preferences = new HashSet<String>();

	public Person(String name, Float budget, Integer maxAwakeTime,
			Integer continuousSleepTime, Set<String> preferences) {
		super();
		this.name = name;
		this.budget = budget;
		this.maxAwakeTime = maxAwakeTime;
		this.continuousSleepTime = continuousSleepTime;
		this.preferences = preferences;
	}

	public Person() {
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Float getBudget() {
		return budget;
	}

	public void setBudget(Float budget) {
		this.budget = budget;
	}
	
	public void addToBudget(Float budget) {
		this.budget += budget;
	}

	public Integer getMaxAwakeTime() {
		return maxAwakeTime;
	}

	public void setMaxAwakeTime(Integer maxAwakeTime) {
		this.maxAwakeTime = maxAwakeTime;
	}

	public Integer getContinuousSleepTime() {
		return continuousSleepTime;
	}

	public void setContinuousSleepTime(Integer continuousSleepTime) {
		this.continuousSleepTime = continuousSleepTime;
	}
	
	public Boolean likesActivity(String activity){
		return preferences.contains(activity);
	}
	
	public void setActivity(String activity) {
		preferences.add(activity);
	}

	@Override
	public String toString() {
		return "Person [name=" + name + ", budget=" + budget
				+ ", maxAwakeTime=" + maxAwakeTime + ", continuousSleepTime="
				+ continuousSleepTime + ", preferences=" + preferences + "]";
	}

	public Set<String> getPreferences() {
		return preferences;
	}

	public void setPreferences(Set<String> preferences) {
		this.preferences = preferences;
	}

	
}
